
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-K"></use>
                    </svg>
                    <div class="name">图片</div>
                    <div class="fontclass">.webim-K</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-D"></use>
                    </svg>
                    <div class="name">展开</div>
                    <div class="fontclass">.webim-D</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-z"></use>
                    </svg>
                    <div class="name">电话</div>
                    <div class="fontclass">.webim-z</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-i"></use>
                    </svg>
                    <div class="name">icon_音量</div>
                    <div class="fontclass">.webim-i</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-A"></use>
                    </svg>
                    <div class="name">关闭</div>
                    <div class="fontclass">.webim-A</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-J"></use>
                    </svg>
                    <div class="name">表情</div>
                    <div class="fontclass">.webim-J</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-T"></use>
                    </svg>
                    <div class="name">删除</div>
                    <div class="fontclass">.webim-T</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-d"></use>
                    </svg>
                    <div class="name">切换相机</div>
                    <div class="fontclass">.webim-d</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-R"></use>
                    </svg>
                    <div class="name">视频</div>
                    <div class="fontclass">.webim-R</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-C"></use>
                    </svg>
                    <div class="name">窗口 最小化</div>
                    <div class="fontclass">.webim-C</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-l"></use>
                    </svg>
                    <div class="name">摄像头</div>
                    <div class="fontclass">.webim-l</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-L"></use>
                    </svg>
                    <div class="name">加</div>
                    <div class="fontclass">.webim-L</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-a"></use>
                    </svg>
                    <div class="name">视频</div>
                    <div class="fontclass">.webim-a</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-U"></use>
                    </svg>
                    <div class="name">地理方位</div>
                    <div class="fontclass">.webim-U</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-e"></use>
                    </svg>
                    <div class="name">mic-c</div>
                    <div class="fontclass">.webim-e</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-F"></use>
                    </svg>
                    <div class="name">群组</div>
                    <div class="fontclass">.webim-F</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-H"></use>
                    </svg>
                    <div class="name">arrow_l</div>
                    <div class="fontclass">.webim-H</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-I"></use>
                    </svg>
                    <div class="name">arrow_r</div>
                    <div class="fontclass">.webim-I</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-V"></use>
                    </svg>
                    <div class="name">logo</div>
                    <div class="fontclass">.webim-V</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-j"></use>
                    </svg>
                    <div class="name">感叹号</div>
                    <div class="fontclass">.webim-j</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-S"></use>
                    </svg>
                    <div class="name">文件</div>
                    <div class="fontclass">.webim-S</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-b"></use>
                    </svg>
                    <div class="name">固定放大</div>
                    <div class="fontclass">.webim-b</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-c"></use>
                    </svg>
                    <div class="name">固定缩小</div>
                    <div class="fontclass">.webim-c</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-O"></use>
                    </svg>
                    <div class="name">恶魔</div>
                    <div class="fontclass">.webim-O</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-k"></use>
                    </svg>
                    <div class="name">感叹号</div>
                    <div class="fontclass">.webim-k</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-M"></use>
                    </svg>
                    <div class="name">设置</div>
                    <div class="fontclass">.webim-M</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-P"></use>
                    </svg>
                    <div class="name">减</div>
                    <div class="fontclass">.webim-P</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-W"></use>
                    </svg>
                    <div class="name">right</div>
                    <div class="fontclass">.webim-W</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-E"></use>
                    </svg>
                    <div class="name">消息</div>
                    <div class="fontclass">.webim-E</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-X"></use>
                    </svg>
                    <div class="name">hyphenate</div>
                    <div class="fontclass">.webim-X</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-G"></use>
                    </svg>
                    <div class="name">搜索</div>
                    <div class="fontclass">.webim-G</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-Q"></use>
                    </svg>
                    <div class="name">退出</div>
                    <div class="fontclass">.webim-Q</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-B"></use>
                    </svg>
                    <div class="name">最大化</div>
                    <div class="fontclass">.webim-B</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-h"></use>
                    </svg>
                    <div class="name">iconfont-video2</div>
                    <div class="fontclass">.webim-h</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-f"></use>
                    </svg>
                    <div class="name">iconfont-mic2</div>
                    <div class="fontclass">.webim-f</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-m"></use>
                    </svg>
                    <div class="name">iconfont-Volume2</div>
                    <div class="fontclass">.webim-m</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-L1"></use>
                    </svg>
                    <div class="name">聊天-群聊</div>
                    <div class="fontclass">.webim-L1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-Z"></use>
                    </svg>
                    <div class="name">音乐</div>
                    <div class="fontclass">.webim-Z</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#webim-n"></use>
                    </svg>
                    <div class="name">黑名单</div>
                    <div class="fontclass">.webim-n</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
        <blockquote>
        <p>实际情况中"iconfont"（font-family）需要修改为你项目下的font-family。可以通过编辑项目查看，默认是"iconfont"。</p>
        </blockquote>
    </div>
</body>
</html>
